package com.chinasoft.movies.controller;

import com.chinasoft.movies.pojo.GenreMoviesPie;
import com.chinasoft.movies.service.GenreMoviesPieService;
import lombok.extern.log4j.Log4j2;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;


@RestController
@Log4j2
@CrossOrigin
public class GenreMoviesPieController {

    @Autowired
    GenreMoviesPieService genreMoviesPieService;

    //每种类型的8-10分电影的总数
    @GetMapping("/queryGenre8to10MoviesCount")
    public List<GenreMoviesPie> queryAllGenreMoviesPie(){
        List<GenreMoviesPie> result = genreMoviesPieService.queryAllGenreMoviesPie();
        return result;
    }
}
